/* AR体验页面样式 */

.ar-camera-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 140px);
    overflow: hidden;
}

.camera-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
}

/* AR扫描区域 */
.ar-scan-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
}

.scan-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    overflow: hidden;
}

.scan-corners .corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #4CAF50;
}

.scan-corners .corner.top-left {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 20px;
}

.scan-corners .corner.top-right {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 20px;
}

.scan-corners .corner.bottom-left {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 20px;
}

.scan-corners .corner.bottom-right {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 20px;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #4CAF50, transparent);
    animation: scan 2s infinite;
}

.scan-text {
    margin-top: 20px;
    text-align: center;
}

@keyframes scan {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(250px); opacity: 0; }
}

/* AR识别结果 */
.ar-result {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-content {
    text-align: center;
    padding: 20px;
    max-width: 300px;
}

.ar-model {
    margin-bottom: 20px;
}

.model-container {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    position: relative;
}

.rotating-model {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rotate 4s infinite linear;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.3));
}

@keyframes rotate {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

.ar-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.ar-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ar-btn.primary {
    background: linear-gradient(135deg, #2E8B57, #87CEEB);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 139, 87, 0.4);
}

.ar-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 139, 87, 0.5);
}

.ar-btn.secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

.ar-btn.secondary:hover {
    background: rgba(255,255,255,0.3);
}

/* AR互动元素 */
.ar-interactions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.interaction-hotspot {
    position: absolute;
    cursor: pointer;
}

.hotspot-pulse {
    width: 40px;
    height: 40px;
    border: 2px solid #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
    position: relative;
}

.hotspot-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* 顶部控制栏 */
.top-controls {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 10;
}

.control-btn {
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(0,0,0,0.7);
    transform: scale(1.1);
}

.ar-modes {
    display: flex;
    gap: 8px;
    background: rgba(0,0,0,0.5);
    border-radius: 25px;
    padding: 4px;
    backdrop-filter: blur(10px);
}

.mode-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mode-btn.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

.mode-btn:hover {
    color: white;
}

/* 底部功能栏 */
.bottom-controls {
    position: absolute;
    bottom: 100px;
    left: 0;
    right: 0;
    z-index: 10;
}

.function-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.function-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.function-btn:hover {
    transform: scale(1.1);
}

.function-btn i {
    font-size: 20px;
}

.capture-btn {
    width: 70px;
    height: 70px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.capture-ring {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.capture-inner {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.capture-btn:hover .capture-ring {
    border-color: rgba(255,255,255,0.5);
}

.capture-btn:hover .capture-inner {
    transform: scale(0.9);
}

.capture-btn:active .capture-inner {
    transform: scale(0.8);
    background: #f0f0f0;
}

/* AR导览模式 */
.ar-guide-mode {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.guide-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.guide-arrow {
    animation: bounce 2s infinite;
    margin-bottom: 20px;
}

.guide-distance {
    margin-bottom: 10px;
}

.guide-target h4 {
    margin-bottom: 5px;
}

.guide-progress {
    position: absolute;
    bottom: 120px;
    left: 20px;
    right: 20px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2E8B57, #87CEEB);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* AR语音助手 */
.ar-assistant {
    position: absolute;
    bottom: 200px;
    right: 20px;
    z-index: 10;
}

.assistant-avatar {
    position: relative;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.assistant-avatar:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.avatar-pulse {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 70px;
    height: 70px;
    border: 2px solid #2196f3;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.assistant-bubble {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 200px;
    background: rgba(0,0,0,0.8);
    border-radius: 15px;
    padding: 12px;
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease-out;
}

.assistant-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(0,0,0,0.8);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 状态栏样式 */
.status-bar {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

/* 隐藏类 */
.hidden {
    display: none !important;
}